import request from '@/utils/request'

/* 根据id查询*/
export function selectProduceById(data) {
  return request({
    url: '/erp/produce/selectProduceById/' + data,
    method: 'post'
  })
}

/* 根据订单id查询*/
export function selectProduceByOrderId(data) {
  return request({
    url: '/erp/produce/selectProduceByOrderId/' + data,
    method: 'post'
  })
}

/* 列表分页*/
export function selectProducePage(data) {
  return request({
    url: '/erp/produce/selectProducePage',
    method: 'post',
    data: data
  })
}

/* 查询可以产量登记的生产*/
export function selectProduceRegistrationPage(data) {
  return request({
    url: '/erp/produce/selectProduceRegistrationPage',
    method: 'post',
    data: data
  })
}

/* 查询可以产量登记的生产*/
export function selectProduceRegistrationList(data) {
  return request({
    url: '/erp/produce/selectProduceRegistrationList',
    method: 'post',
    data: data
  })
}

/* 新增*/
export function saveProduce(data) {
  return request({
    url: '/erp/produce/saveProduce',
    method: 'post',
    data: data
  })
}

/* 修改*/
export function updateProduceById(data) {
  return request({
    url: '/erp/produce/updateProduceById',
    method: 'post',
    data: data
  })
}

/* 生产 */
export function produce(data) {
  return request({
    url: '/erp/produce/produce',
    method: 'post',
    data: data
  })
}

/* 删除*/
export function deleteProduce(data) {
  return request({
    url: '/erp/produce/deleteProduce',
    method: 'post',
    data: data
  })
}

/* 暂停生产*/
export function pauseProduce(data) {
  return request({
    url: '/erp/produce/pauseProduce',
    method: 'post',
    data: data
  })
}

/* 恢复生产*/
export function recoveryProduce(data) {
  return request({
    url: '/erp/produce/recoveryProduce',
    method: 'post',
    data: data
  })
}

/* 查询生产状态数量*/
export function selectProduceStateCount(data) {
  return request({
    url: '/erp/produce/selectProduceStateCount',
    method: 'post',
    data: data
  })
}
